package com.maszy.commons.tools;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;

import com.maszy.pos.PosFrame;

import cr5xdll.CR5XFrame;

public class RptTask extends java.util.TimerTask {
	List list = new ArrayList();
	PosFrame pf = new PosFrame();
	String str = new String();
	private Timer timer;



	public String getStr() {
		return str;
	}

	public void setStr(String str) {
		this.str = str;
	}

	public RptTask() {

	}

	public RptTask(List list, Timer timer) {
		// TODO Auto-generated constructor stub
		this.setTimer(timer);
		this.setList(list);

	}

	public RptTask(String str, Timer timer) {
		// TODO Auto-generated constructor stub
		this.setStr(str);
		this.setTimer(timer);
	}

	public Timer getTimer() {
		return timer;
	}

	public void setTimer(Timer timer) {
		this.timer = timer;
	}

	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}

	@Override
	public void run() {
		// TODO Auto-generated method stub
		 boolean b=Commons.fileIsIn(this.getStr());		
		 if(b){
			 pf.TrRptToTxt(str);
			 timer.cancel();		 
		 }		 
	}



}
